#ifndef H_STATUS

#define H_STATUS

namespace	Platform
{

	namespace	Common
	{

		template<typename TElementType, DWORD number>
		class	TStatus
		{
		public:
			TStatus(){}
			TStatus(const TStatus &object){(*this) = object;}
			TStatus& operator=(const TStatus &object)
			{
				for (int count = 0; count < number; count++)
				{
					m_status[count] = object.m_status[count];
				}
				return (*this);
			}
			bool operator==(const TStatus &object)
			{
				if (this != &object)
				{
					if (number != object.count())
					{
						return false;
					}
					for (int count = 0; count < number; count++)
					{
						if (m_status[count] != object.m_status[count])
						{
							return false;
						}
					}
				}
				return true;
			}
			TElementType& operator[](const int index)
			{
				return m_status[index];
			}
			~TStatus(){}
		public:
			int initialize(const TElementType status)
			{
				for (int count = 0; count < number; count++)
				{
					m_status[count] = status;
				}
				return RETURN_SUCCESS;
			}
			int get(IN DWORD index, OUT TElementType &status)
			{
				status = m_status[index];
				return RETURN_SUCCESS;
			}
			int set(IN DWORD index, IN const TElementType status)
			{
				m_status[index] = status;
				return RETURN_SUCCESS;
			}
			int equal(IN DWORD index, IN const TElementType status)
			{
				if (status != m_status[index])
				{
					return RETURN_FAILED;
				}
				return RETURN_SUCCESS;
			}
			int count()
			{
				return number;
			}
			int destroy()
			{
				return RETURN_SUCCESS;
			}
		private:
			TElementType	m_status[number];
		};

	}

}

#endif
